#include <cuda_runtime.h>


class ApplyRigidTransform{
public:

	struct applyTransform{
		float R[9];
		float t[3];

		__host__ applyTransform(float* rotation, float* translation){
			for(int i = 0; i < 9; i++){
				R[i] = rotation[i];
			}
			for(int i = 0; i < 3; i++){
				t[i] = translation[i];
			}			
		}

		__host__ __device__ float3 operator()(float3 in_out){
			float temp[3];
			temp[0] = in_out.x;
			temp[1] = in_out.y;
			temp[2] = in_out.z;

			for(int i = 0; i < 3; i++){
				temp[i] = 
					in_out.x * R[i * 3] + 
					in_out.y * R[i * 3 + 1] + 
					in_out.z * R[i * 3 + 2] + 
					t[i];
			}

			in_out.x = temp[0];
			in_out.y = temp[1];
			in_out.z = temp[2];
			return in_out;
		}




	};

	
	ApplyRigidTransform();

	void applyRT(float3* in_out, float* R, float* t, int size);



private:










};